<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增主订单')" />
    <style>
        .danwei {
            position: absolute;
            left: 610px;
            top: 6px;
            font-size: 14px;
        }
        .form-group {
            position: relative;
        }
        .is-required::after {
            content: "*";
            color: red;
            margin-left: 5px;
        }
    </style>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-orders-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">订单编号：</label>
                    <div class="col-sm-8">
                        <input name="orderId" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">品名：</label>
                    <div class="col-sm-8">
                        <input name="productName" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">客户名称：</label>
                    <div class="col-sm-8">
                        <input name="customerName" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">纸箱订单量：</label>
                    <div class="col-sm-8">
                        <input name="boxQuantity" class="form-control" type="text" required>
                    </div>
                    <label class="danwei">套</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">加工费：</label>
                    <div class="col-sm-8">
                        <input name="processingFee" class="form-control" type="text">
                    </div>
                    <label class="danwei">元/套</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">税率：</label>
                    <div class="col-sm-8">
                        <input name="tax" class="form-control" type="text" required>
                    </div>
                    <label class="danwei">%</label>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "cardbox/orders";
        $("#form-orders-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-orders-add').serialize());
            }
        }
    </script>
</body>
</html>